package com.luyuan.gallery.service.impl;

import java.util.List;
import com.luyuan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luyuan.gallery.mapper.ExhiGalleryViewsMapper;
import com.luyuan.gallery.domain.ExhiGalleryViews;
import com.luyuan.gallery.service.IExhiGalleryViewsService;

/**
 * 展厅观看记录Service业务层处理
 * 
 * @author luyuan
 * @date 2025-11-13
 */
@Service
public class ExhiGalleryViewsServiceImpl implements IExhiGalleryViewsService {
    @Autowired
    private ExhiGalleryViewsMapper exhiGalleryViewsMapper;

    /**
     * 查询展厅观看记录
     * 
     * @param id 展厅观看记录主键
     * @return 展厅观看记录
     */
    @Override
    public ExhiGalleryViews selectExhiGalleryViewsById(Long id) {
        return exhiGalleryViewsMapper.selectExhiGalleryViewsById(id);
    }

    /**
     * 查询展厅观看记录列表
     * 
     * @param exhiGalleryViews 展厅观看记录
     * @return 展厅观看记录
     */
    @Override
    public List<ExhiGalleryViews> selectExhiGalleryViewsList(ExhiGalleryViews exhiGalleryViews) {
        return exhiGalleryViewsMapper.selectExhiGalleryViewsList(exhiGalleryViews);
    }

    /**
     * 新增展厅观看记录
     * 
     * @param exhiGalleryViews 展厅观看记录
     * @return 结果
     */
    @Override
    public int insertExhiGalleryViews(ExhiGalleryViews exhiGalleryViews) {
        exhiGalleryViews.setCreateTime(DateUtils.getNowDate());
        return exhiGalleryViewsMapper.insertExhiGalleryViews(exhiGalleryViews);
    }

    /**
     * 修改展厅观看记录
     * 
     * @param exhiGalleryViews 展厅观看记录
     * @return 结果
     */
    @Override
    public int updateExhiGalleryViews(ExhiGalleryViews exhiGalleryViews) {
        exhiGalleryViews.setUpdateTime(DateUtils.getNowDate());
        return exhiGalleryViewsMapper.updateExhiGalleryViews(exhiGalleryViews);
    }

    /**
     * 批量删除展厅观看记录
     * 
     * @param ids 需要删除的展厅观看记录主键
     * @return 结果
     */
    @Override
    public int deleteExhiGalleryViewsByIds(Long[] ids) {
        return exhiGalleryViewsMapper.deleteExhiGalleryViewsByIds(ids);
    }

    /**
     * 删除展厅观看记录信息
     * 
     * @param id 展厅观看记录主键
     * @return 结果
     */
    @Override
    public int deleteExhiGalleryViewsById(Long id) {
        return exhiGalleryViewsMapper.deleteExhiGalleryViewsById(id);
    }
}
